package com.tjbklx1.thread.chap05.exchanger;

import java.util.concurrent.Exchanger;

public class Test {
	
	public static void main(String[] args) {
		Exchanger<char[]> exchanger = new Exchanger<char[]>();
		char[] buffer1= new char[10];
		char[] buffer2= new char[10];
		new ProducerThread(exchanger,buffer1,100000).start();
		new ConsumerThread(exchanger,buffer1,100000).start();
	}
}
